/*
 *    Copyright 2011 The gcal-to-refill project
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */
package com.googlecode.gcal2refill;

import java.io.Serializable;
import java.util.Date;
import java.util.Locale;

public class UserInput implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -8670512737531119616L;

	public UserInput() {
		startDate = new Date();
		weekPeriod = 4;
		virticalStartTime = 8;
		virticalPeriod = 18;
		eventFontSize = 7F;
		oneDayEventNum = 4;
		sizeOfPaper = 1;
		tojisiro = true;
		tojisiroSize = 10;
	}

	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append((new StringBuilder("\nthis.startDate: ")).append(startDate)
				.toString());
		sb.append((new StringBuilder("\nthis.weekPeriod: ")).append(weekPeriod)
				.toString());
		sb.append((new StringBuilder("\nthis.virticalStartTime: ")).append(
				virticalStartTime).toString());
		sb.append((new StringBuilder("\nthis.virticalPeriod: ")).append(
				virticalPeriod).toString());
		sb.append((new StringBuilder("\nthis.eventFontSize: ")).append(
				eventFontSize).toString());
		sb.append((new StringBuilder("\nthis.oneDayEventNum: ")).append(
				oneDayEventNum).toString());
		sb.append((new StringBuilder("\nthis.sizeOfPaper: ")).append(
				sizeOfPaper).toString());
		sb.append((new StringBuilder("\nthis.tojisiro: ")).append(tojisiro)
				.toString());
		sb.append((new StringBuilder("\nthis.tojisiroSize: ")).append(
				tojisiroSize).toString());
        sb.append((new StringBuilder("\nthis.locale: ")).append(
            locale).toString());
		return sb.toString();
	}

	public String[] getSelectedCalendar() {
        return selectedCalendar;
    }

    public void setSelectedCalendar(String[] selectedCalendar) {
        this.selectedCalendar = selectedCalendar;
    }

    public String[] getHolidayCalendar() {
        return holidayCalendar;
    }

    public void setHolidayCalendar(String[] holidayCalendar) {
        this.holidayCalendar = holidayCalendar;
    }

    public Date getStartDate() {
		return startDate;
	}

	public int getWeekPeriod() {
		return weekPeriod;
	}

	public int getVirticalStartTime() {
		return virticalStartTime;
	}

	public int getVirticalPeriod() {
		return virticalPeriod;
	}

	public float getEventFontSize() {
	    switch(sizeOfPaper){
	    case 0:
	        return 9F;
	    case 1:
	        return 7F;
	    case 2:
	        return 5F;
	    case 3:
	        return 4F;
	    }
	    return 7F;
	}

	public void setEventFontSize(float eventFontSize) {
		this.eventFontSize = eventFontSize;
	}

	public int getOneDayEventNum() {
		return oneDayEventNum;
	}

	public void setOneDayEventNum(int oneDayEventNum) {
		this.oneDayEventNum = oneDayEventNum;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public void setWeekPeriod(int weekPeriod) {
		this.weekPeriod = weekPeriod;
	}

	public void setVirticalStartTime(int virticalStartTime) {
		this.virticalStartTime = virticalStartTime;
	}

	public void setVirticalPeriod(int virticalPeriod) {
		this.virticalPeriod = virticalPeriod;
	}

	public int getSizeOfPaper() {
		return sizeOfPaper;
	}

	public void setSizeOfPaper(int sizeOfPaper) {
		this.sizeOfPaper = sizeOfPaper;
	}

	public boolean isTojisiro() {
		return tojisiro;
	}

	public void setTojisiro(boolean tojisiro) {
		this.tojisiro = tojisiro;
	}

	public int getTojisiroSize() {
		return tojisiroSize;
	}

	public void setTojisiroSize(int tojisiroSize) {
		this.tojisiroSize = tojisiroSize;
	}

	public Locale getLocale() {
        return locale;
    }

    public void setLocale(Locale locale) {
        this.locale = locale;
    }

    private String[] selectedCalendar;
    private String[] holidayCalendar;
    private Date startDate;
	private int weekPeriod;
	private int virticalStartTime;
	private int virticalPeriod;
	private float eventFontSize;
	private int sizeOfPaper;
	private int oneDayEventNum;
	private boolean tojisiro;
	private int tojisiroSize;
	private Locale locale;
}
